//
//  NSString+PYJSONCategories.m
//  catuncel
//
//  Created by Jim on 2018/1/6.
//  Copyright © 2018年 Jim. All rights reserved.
//

#import "NSString+PYJSONCategories.h"

@implementation NSString (PYJSONCategories)

- (id)JSONValue;
{
    NSData* data = [self dataUsingEncoding:NSUTF8StringEncoding];
   
    __autoreleasing NSError* error = nil;
    
    id result = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error];
    
    if (error != nil) return nil;
    
    return result;
}

@end
